#include "TextureFactory.h"

namespace devii
{

TextureFactory::TextureFactory()
{
}

TextureFactory::~TextureFactory()
{
	for(unsigned int i = 0; i < textures.size(); i++)
	{
		delete textures[i];
	}

	for(unsigned int i = 0; i < render_targets.size(); i++)
	{
		delete render_targets[i];
	}

	for(unsigned int i = 0; i < depth_buffers.size(); i++)
	{
		delete depth_buffers[i];
	}

	textures.clear();
	render_targets.clear();
	depth_buffers.clear();
}

bool TextureFactory::startup()
{
	return true;
}

bool TextureFactory::shutdown()
{
	return false;
}

void TextureFactory::addTexture(Texture* const texture)
{
	textures.push_back(texture);
}

void TextureFactory::addRenderTarget(RenderTarget* const render_target)
{
	render_targets.push_back(render_target);
}

void TextureFactory::addDepthBuffer(DepthBuffer* const depth_buffer)
{
	depth_buffers.push_back(depth_buffer);
}

}